package com.bjesc_b2c.app.appraiset.widget.popupwindow;

import android.content.Context;
import android.view.View;

import com.bjesc_b2c.app.appraiset.R;
import com.bjesc_b2c.app.appraiset.widget.BasePopupWindow;

/**
 * Created by lenovo on 2017/2/24.
 * 拍照界面的popupwindow
 */

public class SelectPhotoPop extends BasePopupWindow implements View.OnClickListener {

    public SelectPhotoPop(Context context, View.OnClickListener listener) {
        super(context, listener);
    }

    @Override
    protected void setAnim(int styleId) {
        super.setAnim(R.style.popupwindow_bottomtotop_anim);
    }

    @Override
    protected void initViews() {
        view = inflater.inflate(R.layout.popup_select_photo,null);
        if(listener!=null){
            view.findViewById(R.id.rlty_select_camera).setOnClickListener(listener);
            view.findViewById(R.id.rlty_select_album).setOnClickListener(listener);
        }
        view.findViewById(R.id.tv_cancel).setOnClickListener(this);
    }

    @Override
    protected int setRootViewId() {
        return R.id.root;
    }

    @Override
    public void onClick(View view) {
        dismiss();
    }
}
